<%@ page contentType="text/html;charset=utf-8" language="java"%>
	<!--top navigator end<div class="top-nav">
    	<div class="top-nav-bg">
    		<div class="top-logo-img fl">
            	<a href="#" class="top-nav-logo"></a>
            </div>
        	<span class="nav-txt fl ml15">发现</span>
        	<div class="nav-search ml20 fl">
            	<input type="text" value="搜索" id="search" name="search" class="nav-search-input fl"/>
                <a href="#" class="nav-search-btn fl"></a>
             </div>
        	<ul class="nav-user fr">
        		<li class="nav-user-list"><a href="#">收藏</a></li>
            	<li class="nav-user-list"><a onclick="toEdit()">编辑</a></li>
            	<li class="nav-user-list"><a onclick="toHome()">个人主页</a></li>
            	<li class="nav-user-list"><a onclick="toRecommoned()">首页</a></li>
            	<li class="nav-user-list"><a onclick="toLogin()">登出</a></li>
        	</ul>
         </div>
    </div> -->
    
    	<!--Top navigator -->
	<div class="top-nav">
         <div class="top-nav-bg">
    		<div class="top-logo-img fl">
            	<a href="#" class="top-nav-logo"></a>
            </div><span style="color:#fff;font-size:16px;padding-left:20px;">${sessionScope.loginUser.username!=null?"你好":""},${sessionScope.loginUser.username}</span>
        	<ul class="nav-user fr">
        		<li class="nav-user-list nav-user-list-1"><a href="#" title="编辑页" onclick="toEdit();">&nbsp;</a></li>
        		<li class="nav-user-list nav-user-list-2"><a href="#" title="有而页" onclick="toHome()">&nbsp;</a></li>
        		<li class="nav-user-list nav-user-list-3"><a href="#" title="Hi+页" onclick="toHi()">&nbsp;</a></li>
        		<li class="nav-user-list nav-user-list-4"><a href="#" title="推荐页" onclick="toTuiJian()">&nbsp;</a></li>
        		<li class="nav-user-list nav-user-list-5"><a href="#" title="收藏页" onclick="toRecommoned(1)">&nbsp;</a></li>
        		<li class="nav-user-list nav-user-list-6"><a href="#" title="用户页" onclick="toAccount()">&nbsp;</a></li>
        		<li class="nav-user-list nav-user-list-7"><a href="#" title="退出" onclick="toLogin()">&nbsp;</a></li>
        	</ul>
         </div>
    </div><!--top navigator end -->
    <script>
        function toHi() {
        	window.location.href='${path}/himessages.jsp';
        }
        function toTuiJian() {
        	window.location.href='${path}/discover.jsp';
        }
        
	    function toIndex(){
	    	window.location.href='${path}/index.jsp';
	    }
	    function toEdit(){
	    	window.location.href='${path}/edit.jsp';
	    }
	    function toHome(){
	    	window.location.href='${path}/card.jsp';
	    }
	    function toRecommoned(type){
	    	window.location.href='${path}/collection.jsp?type='+type;
	    }
	    function toAccount() {
        	window.location.href='${path}/account.jsp';
        }
	    function toLogin() {
	    	objp={}
	 	   $.ajax({
				  url: '${path}/core/logout',
				  type: 'POST',
				  timeout: 30000,
				  cache : false,
			      data :objp,
			      async: false,
				  success:function(msg){
					  toIndex();
				   },
				   failure:function(msg){
					   alert(eval('('+msg.responseText+')').error_text);
				   		
				   },
				   error:function(msg){
					   alert(eval('('+msg.responseText+')').error_text); 
				   }
			});
	    }
    </script>

